package cn.miju.admin.system.controller;

import cn.miju.admin.framework.model.BaseInfo;
import cn.miju.admin.framework.model.BasePage;
import cn.miju.admin.system.service.OperLogService;
import cn.miju.admin.system.vo.OperLogPageInVO;
import cn.miju.admin.system.vo.OperLogPageOutVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <pre>
 * 操作日志
 * </pre>
 *
 * @author zhuming
 * @version 1.0.0
 * @since 2023-06-21 14:17
 */
@RestController
@Api(tags = "系统-操作日志")
@ApiSort(7)
@RequestMapping("/system/operLog")
public class OperLogController {

    private final OperLogService service;

    public OperLogController(OperLogService service) {
        this.service = service;
    }

    /**
     * 分页查询操作日志
     * @param inVO {@link OperLogPageInVO}
     * @return {@link Page<OperLogPageOutVO>}
     */
    @GetMapping("/page")
    @ApiOperation("分页查询操作日志")
    @ApiOperationSupport(order = 1, author = "zhuming")
    public Page<OperLogPageOutVO> getOperLogPage(@ApiParam @ModelAttribute OperLogPageInVO inVO) {
        return service.getPage(inVO);
    }
}
